﻿using UnityEngine;
using System.Collections;

public class EvenementAleatoire : MonoBehaviour {

	// Properties
	//
	//

	public string Title = "Event !";
	public string Description = "An Event Happened !";

	// Sur 100
	public float Probabilite = 50;

	public float MinBuild = -1000;
	public float MaxBuild = 10000;
	public float MinMood = -350;
	public float MaxMood = 350;
	public float MinPop = 0;
	public float MaxPop = 100000;

	public float ModifBuild =0;
	public float ModifPop = 0;
	public float ModifMood = 0;

	// Methods
	//
	//

	public bool CheckCondition(Manager manager){

		bool res = true;

		if(this.MinBuild > manager.Building){
			res = false;
		}

		if(this.MinMood > manager.Mood){
			res = false;
		}

		if(this.MinPop > manager.Population){
			res = false;
		}

		if(this.MaxBuild < manager.Building){
			res = false;
		}

		if(this.MaxMood < manager.Mood){
			res = false;
		}

		if(this.MaxPop < manager.Population){
			res = false;
		}

		return res;
	}

}
